package site.oldpei.manage.erupt.login;

import org.springframework.stereotype.Service;
import xyz.erupt.jpa.dao.EruptDao;
import xyz.erupt.upms.fun.LoginProxy;
import xyz.erupt.upms.model.EruptUser;
import xyz.erupt.upms.service.EruptUserService;

import javax.annotation.Resource;

/**
 * 自动登录类，省略登陆
 */
@Service
public class AutoLogin implements LoginProxy {

    @Resource
    private EruptDao eruptDao;

    @Resource
    private EruptUserService eruptUserService;

    @Override
    public EruptUser login(String account, String pwd) {
        return eruptDao.queryEntity(EruptUser.class, "account = 'erupt'"); //获取用户对象
    }
}
